<div class="fly-header layui-bg-black">
  <div class="layui-container ">
    <a class="fly-logo" href="/">
     <img src="{$settings.site.logo}">
 <!--      <h2 style="width:250px;line-height:30px;text-align:center;color:#fff">用户中心</h2> -->
    </a>
    <ul class="layui-nav fly-nav layui-hide-xs">

         {qilecms:nav}
           <li class="layui-nav-item">
             <a href="{$vo.url}" {if $vo.target} target="_blank" {/if}>
           {if $vo.icon}<i class="{$vo.icon}" aria-hidden="true"></i> {/if}{$vo.name}</a>
           </li>
        {/qilecms:nav}
    </ul>
    
    <ul class="layui-nav fly-nav-user">
      {if  !session('uid')}  
      <!-- 未登陆的状态 -->
      <li class="layui-nav-item">
        <a href="{:url('/user/login')}">登陆</a>
      </li>
      <li class="layui-nav-item">
        <a href="{:url('/user/register')}">注册</a>
      </li>
      
      <!--登陆后的状态 -->
      {else} 
      <li class="layui-nav-item">
        <a class="fly-nav-avatar" href="{:url('@user')}">
          <cite class="layui-hide-xs">{$Think.session.username}</cite>

          {:avatar($user.uid,48)}
        </a>
        <dl class="layui-nav-child">
          <dd><a href="{:url('/user/set')}">
          <i class="layui-icon">&#xe620;</i>基本设置</a></dd>
          <dd><a href="{:url('/user/message')}">
          <i class="layui-icon layui-icon-notice" style="top: 4px;"></i>我的消息</a></dd>
          <hr style="margin: 5px 0;">
          <dd><a href="{:url('/user/logout')}" style="text-align: center;">退出</a></dd>
        </dl>
      </li>
      {/if}
    </ul>
  </div>
</div>
